using System;
using System.Collections.Generic;
using System.Globalization;
using Cfg.ConfigProviders;

namespace Cfg
{
    /// <summary>
    /// 
    /// </summary>
	public class ConfiguratorSettings
	{
		/// <summary>
		/// If not set, current threads culture is used.
		/// </summary>
		public CultureInfo Culture = null;

        /// <summary>
        /// Characters that will be considered as array delimiters.
        /// </summary>
		public char[] ArrayDelimiters = { ',', ';' };

        /// <summary>
        /// Default configuration file provider
        /// </summary>
        public IConfigFileProvider DefaultConfigFileProvider = new DotnetConfigFileProvider(null);

        public readonly Dictionary<Type, Delegate> Parsers = new Dictionary<Type, Delegate>(); 

        public ConfiguratorSettings AddParser<T>(Func<string, T> parser)
        {
            Parsers[typeof (T)] = parser;
            return this;
        }
	}
}